home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-10 | 1013 b | 39 lines | [TEXT/CWIE] |
- unit MyExpiry;
-
- interface
-
- uses
- Types;
-
- function ExpiredVersion (cs:UInt32; notify, expire: integer): boolean;
- { Pass it compdate, and the number of months until it notifies/expires }
-
- implementation
-
- uses
- OSUtils, MyStrings, MyEmergencyNotifier, MyUtils, MyTypes, MySystemGlobals;
-
- function ExpiredVersion (cs:UInt32; notify, expire: integer): boolean;
- var
- date: UInt32;
- diff: longint;
- begin
- ExpiredVersion := false;
- if version.numericVersion.stage <> $80 then begin
- GetDateTime(date);
- if compsecs > cs then begin
- cs := compsecs;
- end;
- diff := date - cs;
- if diff >= expire * (31*day_in_seconds) then begin
- EmergencyNotify('This developmental version has expired. Set your clock back, or get a new version');
- ExpiredVersion := true;
- end else if diff >= notify * (31*day_in_seconds) then begin
- EmergencyNotify('This developmental version has expired. It will work for a while, and then stop working forever. Get a new version');
- end;
- end;
- end;
-
-
- end.
-